<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.eagle.utils.DateUtil"%>
<%@page import="java.util.Date"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@page import="com.eagle.utils.StrUtil"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>发票使用查询</title>
    <link href="<%=request.getContextPath()%>/css/main.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="<%=request.getContextPath()%>/js/common.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath() %>/dateCommon/WdatePicker.js"></script>
    <script type="text/javascript">
    function invQuery() {
		var operflag = (checkCE(Trim(document.getElementById('oper').value)) <= 0);
		var cardTypeflag = (checkCE(Trim(document.getElementById('wasteType').value)) <= 0);
		var startTimeflag = (checkCE(Trim(document.getElementById('start').value)) <= 0);
		var endTimeflag = (checkCE(Trim(document.getElementById('end').value)) <= 0);
		//var beginTime = document.getElementById('start').value;
		//var endTime = document.getElementById('end').value;
		//提醒输入开始日期和结束日期

		if(startTimeflag == true){
			alert('开始日期不能为空');
			return false;
		}
		if(endTimeflag == true){
			alert('结束日期不能为空');
			return false;
		}
		
		/*
		if(cardIDflag == true){
		    alert('请输入卡号')
		    return false;
		}
		*/
		document.myform.action = "invoiceAction!searchInvoice.action";
		document.myform.submit();
	}
	
	
    </script>
    </head>
  

   <body><h2><br></h2>
   <form id="myform" name="myform" method="post" action="">
		<table width="91%" cellpadding="0" cellspacing="0" border="1" class="table">
		<tr>
  			<td colspan="6">
  				<table width="100%" class="top" cellpadding="0" cellspacing="0">
  			 		<tr>
               			 <td>当前位置:&nbsp;<a href="#">业务查询</a>&nbsp;&gt;&gt;&nbsp;<a href="#">发票使用查询</a> &gt;&gt;&nbsp;</td>
              		</tr>
  				</table>
  			</td>
  		</tr>
  		
  		<tr>
  			<td colspan="1">
  				<table width="100%"  cellpadding="0" cellspacing="0" height="27">
  					<tr class="trBlackTitle">
  						 <td width="80%"><font style="font-weight:bold">查询条件</font></td>
  						 <td><input type="button" class="btn7" value="查询" onclick="invQuery()"/></td>
  					</tr>
  				</table>
  			</td>
  		</tr>
  		
  		<tr>
  			<td colspan="1" height="160px" valign="top">
  				<table width="100%" cellpadding="5" cellspacing="1" border="0"> 
  					 <tr>
  						<td class="td_dashed1" width="11%">操作员</td>
  						<td colspan="3"><input type="text" name="oper" id="oper" value='<s:property value="oper"/>' class="input" size="60"/></td>
  						<td class="td_dashed1" width="11%">业务类型</td>
  						<td colspan="3"><input type="text" name="wasteType" id="wasteType" value='<s:property value="wasteType"/>' class="input" size="60"/></td>
 					 </tr>
 					 </table>
 			</td>
 	  </tr>		 
 	  <tr>
  			<td colspan="1" height="160px" valign="top">
  				<table width="100%" cellpadding="5" cellspacing="1" border="0"> 
  					 <tr>
  						<td class="td_dashed1" width="11%">时间范围</td>
  						<td colspan="3"> 
  			 <% 
				Date start = (Date)request.getAttribute("beginTime");
				String tempstart = "";
				String tempend = "";
				
				if(start == null){
					
				}else{
					tempstart = DateUtil.parseDateToString(start);
				}
				
				Date end = (Date)request.getAttribute("endTime");
				if(end == null){
				    //tempstart = DateUtil.getNowDate();
				}else{
					tempend = DateUtil.formatDate(end);
				}
			%>
				<input id="start" name="beginTime" class="Wdate" value="<%=tempstart %>" type="text"
					onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'end\')||\'2020-10-01\'}'})" />
				&nbsp;至&nbsp;
				<input id="end" name="endTime" class="Wdate" value="<%=tempend %>" type="text"
				onFocus="WdatePicker({minDate:'#F{$dp.$D(\'start\')}'})" />
         </td>
  					
 					 </tr>
 					 </table>
 			</td>
 	  </tr>	
 	 		
  		<tr>
  			<td colspan="1">
  				<table width="100%"  cellpadding="0" cellspacing="0">
  					<tr class="trBlackTitle">
  						 <td width="80%"><font style="font-weight:bold">发票使用信息</font></td>
  					</tr>
  				</table>
  			</td>
  		</tr>
  		<tr>
		  	<td colspan="1" height="160px" valign="top">
		  		<table width="100%" cellpadding="5" cellspacing="1" border="0">
		  			<s:if test="PrintInvWasteList != null">
		  			<tr>
		  				<td class="td_dashed1" width="11%">时间</td>
		  				<td class="td_dashed1" width="11%">操作员</td>
		  				<td class="td_dashed1" width="11%">业务类型</td>
		  				<td class="td_dashed1" width="11%">发票票号</td>
		  				<td class="td_dashed1" width="11%">金额</td>
		  				<td class="td_dashed1" width="11%">备注</td>
		  			</tr>
		  				<s:iterator value="PrintInvWasteList" id="printInvWaste">
		  				<tr>
		  					<td><input type="text" name="printInvWaste.WasteTime" class="input" value="<s:property value="#printInvWaste.WasteTime"/>" readOnly/>
		  					</td>
		  					<td><input type="text" name="printInvWaste.Oper" id="printInvWaste.Oper" class="input"  value="<s:property value="#printInvWaste.Oper"/>" readOnly/>
		  					</td>
		  					<td><input type="text" name="printInvWaste.WasteType" id="printInvWaste.WasteType" class="input" value="<s:property value="#printInvWaste.WasteType"/>" readOnly/>
		  					</td>
		  					<td><input type="text" name="printInvWaste.InvID" id="printInvWaste.InvID" class="input" value="<s:property value="#printInvWaste.InvID"/>" readOnly/>
		  					</td>
		  					<td><input type="text" name="printInvWaste.pointMoney" id="printInvWaste.pointMoney" class="input" value="<s:property value="#printInvWaste.pointMoney"/>" readOnly/>
		  					</td>
		  					<td><input type="text" name="printInvWaste.InvalidInvoiceFlag" id="printInvWaste.InvalidInvoiceFlag" class="input" size="40" value="<s:property value="#printInvWaste.InvalidInvoiceFlag"/>" readOnly/>
		  					</td>
		 				</tr>
		  				</s:iterator>
		  			<tr>
						<td colspan=6 align="center" border="1"><s:property value="str_pageInfor" escape="false"/></td>
					</tr>
		  			</s:if>
		 		</table>
		 	</td>
		</tr>
  		</table>
  	</form>
  </body>
</html>
